package com.woniu.apartment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.apartment.mapper.ApartLayoutMapper;
import com.woniu.apartment.domain.ApartLayout;
import com.woniu.apartment.service.IApartLayoutService;

/**
 * 公寓房型Service业务层处理
 * 
 * @author yy
 * @date 2023-04-03
 */
@Service
public class ApartLayoutServiceImpl implements IApartLayoutService 
{
    @Autowired
    private ApartLayoutMapper apartLayoutMapper;

    /**
     * 查询公寓房型
     * 
     * @param id 公寓房型主键
     * @return 公寓房型
     */
    @Override
    public ApartLayout selectApartLayoutById(Long id)
    {
        return apartLayoutMapper.selectApartLayoutById(id);
    }

    /**
     * 查询公寓房型列表
     * 
     * @param apartLayout 公寓房型
     * @return 公寓房型
     */
    @Override
    public List<ApartLayout> selectApartLayoutList(ApartLayout apartLayout)
    {
        return apartLayoutMapper.selectApartLayoutList(apartLayout);
    }

    /**
     * 新增公寓房型
     * 
     * @param apartLayout 公寓房型
     * @return 结果
     */
    @Override
    public int insertApartLayout(ApartLayout apartLayout)
    {
        return apartLayoutMapper.insertApartLayout(apartLayout);
    }

    /**
     * 修改公寓房型
     * 
     * @param apartLayout 公寓房型
     * @return 结果
     */
    @Override
    public int updateApartLayout(ApartLayout apartLayout)
    {
        return apartLayoutMapper.updateApartLayout(apartLayout);
    }

    /**
     * 批量删除公寓房型
     * 
     * @param ids 需要删除的公寓房型主键
     * @return 结果
     */
    @Override
    public int deleteApartLayoutByIds(Long[] ids)
    {
        return apartLayoutMapper.deleteApartLayoutByIds(ids);
    }

    /**
     * 删除公寓房型信息
     * 
     * @param id 公寓房型主键
     * @return 结果
     */
    @Override
    public int deleteApartLayoutById(Long id)
    {
        return apartLayoutMapper.deleteApartLayoutById(id);
    }
}
